//2009/08/16 01:22:18
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class Barbecue
{
public:
    int eliminate(int n, vector <int> voter, vector <int> excluded)
    {
		vector<int> v(n, 0);
		for(int i=0; i<voter.size(); i++)
		{
			v[voter[i]] ++;
			v[excluded[i]] += 60;
		}
		int mmax = 0;
		int dex = 0;
		for(int i=0; i<n; i++)
		{
			if(v[i] > mmax)
			{
				dex = i;
				mmax = v[i];
			}
		}
		return dex;
    }
};
